package com.luban.springcloud.service;

import java.util.List;
import java.util.Map;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import com.luban.springcloud.pojo.User;

//这里的LUBANSERVICE-USER是服务提供者的spring.application.name
@FeignClient(value="luban-provider",fallbackFactory=UserFeignClientFallbackFactory.class)
public interface UserFeignClientService {

	@GetMapping(value="/user/get/{id}")
	public User get(@PathVariable("id")Integer id);
	
	@GetMapping("/user/list")
	public List<User> list();
	
	@PostMapping(value="/user/adOrUp")
	public String addOrUpdateUser(User user);

	
	@GetMapping(value="/user/delete/{id}")
	public boolean delete(@PathVariable("id")Integer id);
	
	@GetMapping(value="/user/getServiceInfo")
	public Map<String,Object> getServiceInfo();

}
